package com.cxh.rmsq.ui.activity.self

import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.TextView
import com.cxh.rmsq.R
import com.cxh.rmsq.ui.activity.BlackListActivity
import com.cxh.rmsq.ui.activity.NewMessageRemindActivity
import com.cxh.rmsq.ui.activity.TitleBaseActivity

/**
 * 隐私
 */
class PrivacySelfActivity : TitleBaseActivity(), View.OnClickListener {
    private val tvBlack: TextView by lazy { findViewById<TextView>(R.id.tv_black) }
    private val tvPermission: TextView by lazy { findViewById<TextView>(R.id.tv_permission) }
    private val sivShowNewMsg: TextView by lazy { findViewById<TextView>(R.id.siv_show_new_msg) }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_privacy_self)
        titleBar.tvTitle.text = "隐私"

        tvBlack.setOnClickListener(this)
        tvPermission.setOnClickListener(this)
        sivShowNewMsg.setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        when (v?.id) {
            R.id.tv_black -> {
                startActivity(Intent(this@PrivacySelfActivity, BlackListActivity::class.java))
            }

            R.id.siv_show_new_msg -> {
                // 新消息通知
                startActivity(Intent(this, NewMessageRemindActivity::class.java))
            }

            R.id.tv_permission -> {

            }
        }
    }
}